//
//  API.h
//  LvXi_newVersion
//
//  Created by 王敏 on 16/8/20.
//  Copyright © 2016年 SJT. All rights reserved.
//

#ifndef API_h
#define API_h


#endif /* API_h */

#import <Foundation/Foundation.h>

#import <math.h>
//#define host @"http://lxhuang.ngrok.cc"

//#define host @"http://192.168.1.88"

#define host @"http://app.lx139.com"

#pragma mark - /*************个人中心接口*************/

/**post*/
#define RegisterAPI [NSString stringWithFormat:@"%@/%@",host,@"api/auth/register"]

/**post*/
#define LoginAPI [NSString stringWithFormat:@"%@/%@",host,@"api/auth/login"]

#define SocailLoginAPI [NSString stringWithFormat:@"%@/%@",host,@"api/auth/social/login"]
#define SocailRegisterAPI [NSString stringWithFormat:@"%@/%@",host,@"api/auth/social/register"]


///post mobile
#define GetSmsCodeAPI [NSString stringWithFormat:@"%@/%@",host,@"api/user/sms"]

///post uid file
#define UpLoadHeaderImageAPI [NSString stringWithFormat:@"%@/%@",host,@"api/user/headimg"]

#pragma mark - 获取用户信息
///get uid(就是user_id)
#define GetUserInfoAPI [NSString stringWithFormat:@"%@/%@",host,@"api/personal/getuserinfo"]
#pragma mark - 修改用户信息
///post
#define UpDateUserInfoAPI [NSString stringWithFormat:@"%@/%@",host,@"api/user/set"]

#pragma mark - 忘记密码
///get
#define ForgetPasswordAPI [NSString stringWithFormat:@"%@/%@",host,@"api/personal/forgetpassword"]

#pragma mark - 忘记密码 界面获取验证码
//POST
#define ForgetPasswordGetCodeAPI [NSString stringWithFormat:@"%@/%@",host,@"api/personal/getcode"]


///获取订单列表 get user_id paystatus
#define GetOrderListAPI [NSString stringWithFormat:@"%@/%@",host,@"api/user/orderPayment"]

///签到功能
#define UserSignAPI [NSString stringWithFormat:@"%@/%@",host,@"api/user/userSign"]

///获取签到天数
#define GetSignDaysAPI [NSString stringWithFormat:@"%@/%@",host,@"api/user/getsigndays"]

///获取用户绿豆数量
#define GetGreenBeansCountAPI [NSString stringWithFormat:@"%@/%@",host,@"api/user/getbeans"]

///获取用户绿豆详情
///get user_id
#define GetGreenBeansDetailAPI [NSString stringWithFormat:@"%@/%@",host,@"/api/user/getbeansrecord"]


/**************首页banner**************/
///get
#define BannerAPI [NSString stringWithFormat:@"%@/%@",host,@"api/index/indexBanner"]


#pragma mark - /**************首页限时抢购****************/
///post s_name =@"限时抢购"
#define FlashsaleAPI [NSString stringWithFormat:@"%@/%@",host,@"api/product/special"]

#pragma mark - /**************首页数据****************/
///get
#define IndexfloorAPI [NSString stringWithFormat:@"%@/%@",host,@"api/index/indexfloor"]


#pragma mark - /*************商品规格************/
///get product_id
#define ProductSpecAPI [NSString stringWithFormat:@"%@/%@",host,@"api/product/spec"]

#pragma mark - /*************商品详情************/
#define ProductDetailAPI(product_id) [NSString stringWithFormat:@"%@/%@/%@",host,@"api/product/detail",product_id]



#pragma mark - /*************搜索************/
#define SearchAPI(keyword) [NSString stringWithFormat:@"%@/%@/%@",host,@"api/product/searchother",[keyword stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]



#pragma mark - /***********分类***************/
///get
#define CategoryAPI [NSString stringWithFormat:@"%@/%@",host,@"api/getCats"]
#define ProductAPI(cat_id)  [NSString stringWithFormat:@"%@/%@/%@",host,@"api/getProducts",cat_id]
///get
#define GetproductsAPI [NSString stringWithFormat:@"%@/%@",host,@"api/getProducts"]

#pragma mark - /***********获取月账单信息**************/
///post user_id
#define GetCommissionAPI [NSString stringWithFormat:@"%@/%@",host,@"api/commission/getCommission"]


#pragma mark - /************购物车相关************/

//添加商品到购物车
#define AddToShopCarAPI [NSString stringWithFormat:@"%@/%@",host,@"api/cart/addToCart"]

#define GetAliPayInfoAPI [NSString stringWithFormat:@"%@/%@",host, @"api/order/getmobilealipay"]

//从购物车删除商品
#define DeleteGoodsAPI [NSString stringWithFormat:@"%@/%@",host,@"api/cart/delFromCart"]

//购物车商品列表
#define ShopCarListAPI [NSString stringWithFormat:@"%@/%@",host,@"api/cart/getCartList"]

/**添加收货地址*/
/**post user_id name mobile def_addr province city district*/
#define AddAddressAPI [NSString stringWithFormat:@"%@/%@",host,@"api/cart/createUserAddr"]


#define GetAddresListAPI [NSString stringWithFormat:@"%@/%@",host,@"api/cart/getUserAddrList"]

#define DelAddresAPI [NSString stringWithFormat:@"%@/%@",host,@"api/cart/deladdress"]

//获取订单号
#define GenerateOrderAPI [NSString stringWithFormat:@"%@/%@",host,@"api/order/generateOrder"]  //post

//更新订单信息
#define UpDataOrderStatuAPI [NSString stringWithFormat:@"%@/%@",host,@"api/order/updatePayStatus"]

///获取优惠券
///get words user_id
#define GetCouponAPI [NSString stringWithFormat:@"%@/%@",host,@"api/favourable/getfav"]

///j获取优惠券列表
///get user_id
#define GetCouponListAPI [NSString stringWithFormat:@"%@/%@",host,@"api/favourable/getallfavourable"]

///获取绿豆 get user_id
#define GetGreenBeanAPI [NSString stringWithFormat:@"%@/%@",host,@"api/user/getbeans"]

///添加关注
///post user_id product_id
#define AddFocusAPI [NSString stringWithFormat:@"%@/%@",host,@"api/attention/payattention"]

///移除关注
///get user_id product_id
#define DelFocusAPI [NSString stringWithFormat:@"%@/%@",host,@"api/attention/attentiondel"]

///关注列表
///get user_id product_id
#define ListFocusAPI [NSString stringWithFormat:@"%@/%@",host,@"api/attention/attentionlist"]


#define GetArticleList [NSString stringWithFormat:@"%@/%@",host,@"api/article"]


#define TestVideoUrl @"http://new.lx139.com/video/1.mp4"

